package com.chenliwu.demo.oop;

/**
 * @author chenliwu
 * @since 2022-02-21
 */
public class OopDemo {
    static class Parent {
        String name = "Parent name";

        public static String getShowText() {
            return "Parent getShowText";
        }
    }

    static class Child extends Parent {
        String name = "Child name";

        public static String getShowText() {
            return "Child getShowText";
        }
    }

    static String getData(int num) {
        return "int num";
    }

    static String getData(Integer num) {
        return "Integer num";
    }

    public static void main(String[] args) {
        System.out.println(getData(10));

        Integer integer = 10;
        System.out.println(getData(integer));
    }

    static void test1() {
        Parent parent = new Child();
        // Parent name
        System.out.println(parent.name);
        // Parent getShowText
        System.out.println(parent.getShowText());
    }

}
